1. Field of the Invention
The present invention relates to an image processing apparatus that performs predetermined image processing on image data and outputs the data, and a method of controlling the apparatus.
2. Description of the Related Art
In image processing apparatuses, such as copy machines, facsimile machines and laser printers, input digital image data is stored line-by-line in a line memory, and rotation, various types of filtering and the like are performed. In this manner, image processing is executed on the image data as rotation, smoothing, enlargement/reduction, and edge enhancement. Image processing apparatuses that execute such image processing generally include a page memory and an image processor including a rotation unit, a filtering unit and the like for image processing usage and image data editing usage. Such an image processor will be described taking a rotation unit that rotates image data, for example, 90 degrees as an example. When rotating image data 90 degrees, image data corresponding to one page is written into, for example, a page memory in raster order (horizontal scan order). Then, when reading the image data, by reading the image data in the vertical direction, the image data can be rotated. However, implementation of such rotation requires a huge page memory that can handle a maximum size of one page.
As a method for suppressing the increase of the capacity of page memory, a method has been proposed in which a page image is divided into tile images, the image data is rotated in units of tiles, the rotated tile images are finally combined, and thereby the page image is rotated.
According to this method, however, when filter calculation is performed on a pixel of interest by referring to the pixel of interest and peripheral pixels surrounding the pixel of interest, if the pixel of interest is a pixel located on the boundary between tile images, it is not possible to execute calculation with a single tile image. Accordingly, when the pixel of interest is a pixel located on the boundary between tile images, in order to perform calculation including the peripheral pixels, it is necessary to provide a band memory capable of storing a plurality of tile images according to the size of filter calculation.
As a solution for such calculation that refers to peripheral pixels, for example, Japanese Patent Laid-Open No. 2005-198121 proposes a method in which pixels are overlapped when dividing an original image to be processed into tile images, so that a pixel of interest located in the vicinity of the boundary between tile images can refer to the peripheral pixels. When processing the pixel located on the boundary between tile images by using the peripheral pixels, filter calculation or the like is performed by referring to the pixels in the overlap portion without requiring a line memory for storing peripheral pixels as described above.
However, when dividing an image into tile images, if overlap portions are added and then the image is divided as described above, the amount of data of each tile image will be the sum of the amount of actual image data (a portion that does not overlap) and the amount of image data of the overlap portion. For example, in the case of a tile image including 16×16 pixels (256 pixels), if two pixels are added to the left, right, upper and lower sides of each tile image as peripheral pixels constituting an overlap portion, the total amount of data will be 20×20 pixels (400 pixels). In other words, the amount of data of a tile image to which an overlap portion has been added is 1.5 times larger than that of a tile image to which an overlap portion has not been added, and the throughput required for a memory when reading the tile image from the memory will also be 1.5 times higher. Accordingly, when the throughput is less than required, increased frequency, increased bus width and the like are required as memory specifications, and it is not possible to avoid an increase in memory cost.